﻿#region Namespace References

using System;
using System.Windows.Forms;
using DynConDevCorp.OpenArch.SmartData.BillingDemo1.ApplicationBusinessObjects;
using DynConDevCorp.OpenArch.SmartData.Core;
using DynConDevCorp.OpenArch.SmartData.Interfaces.Attributes;

#endregion

namespace DynConDevCorp.OpenArch.SmartData.BillingDemo1.SmartUIControls
{
    public partial class ProductControl : UserControl
    {
        #region Constructors

        public ProductControl()
        {
            InitializeComponent();
            Product = new SmartEntityLink<Product>();
            Product.LinkedEntityChanged += Product_LinkedEntityChanged;
        }

        #endregion

        #region Public Instance Properties

        [AutoField]
        public SmartEntityLink<Product> Product { get; set; }

        #endregion

        #region Public Instance Methods

        public void Product_LinkedEntityChanged(object sender, EventArgs e)
        {
            ////smartControl1.BoundSmartField = Order["OrderNumber"];
            ////invoiceLineItemCollectionControl1.SetLineItems(Order["Items"] as SmartEntityCollection<OrderDetail>);
        }

        #endregion
    }
}